<template>
  <view class="container">
    <uni-list>
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.name" />
      <!-- <uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码" :rightText="user.phonenumber" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱" :rightText="user.email" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="岗位" :rightText="postGroup" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色" :rightText="roleGroup" />
      <uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期" :rightText="user.createTime" /> -->
    </uni-list>
	<view>
		<button type="primary" @click="loginOut">退出登录</button>
	</view>
  </view>
</template>

<script>
  import { getUserProfile, getUserInfo } from "@/api/system/user"
  import { removeToken } from '@/utils/auth'
  import storage from '@/utils/storage'
  
  export default {
    data() {
      return {
        user: {},
        roleGroup: "",
        postGroup: ""
      }
    },
    onLoad() {
      this.getUser()
    },
    methods: {
      getUser() {
		  this.user = { ...this.$store.state.user}
      },
	  loginOut() {
		  this.$modal.confirm('确定注销并退出系统吗？').then(() => {
			  // removeToken()
			  // this.$tab.reLaunch('/pages/mine/index')
			  // storage.clean()
		    // this.$store.dispatch('LogOut').then(() => {
		    //   this.$tab.reLaunch('/pages/index')
		    // })
		  })
	  }
    }
  }
</script>

<style lang="scss">
  page {
    background-color: #ffffff;
  }
</style>
